﻿@model GqqMvcWeb.Models.Database.student
@{
    ViewBag.Title = "Details";
}
<h2>
    Details</h2>
<fieldset>
    <legend>student</legend>
    <div class="display-label">
        LastName</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.LastName)
    </div>
    <div class="display-label">
        FirstMidName</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.FirstMidName)
    </div>
    <div class="display-label">
        EnrollmentDate</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.EnrollmentDate)
    </div>
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id = Model.StudentID }) |
    @Html.ActionLink("Back to List", "Index")
</p>
<div class="display-label">
    @Html.LabelFor(m => m.Enrollments)
</div>
<div class="display-field">
    <table>
        <tr>
            <td>
                课程标题
            </td>
            <td>
                级别
            </td>
        </tr>
        @foreach (var enrollment in Model.Enrollments)
        {
            <tr>
                <td>
                    @enrollment.Course.Title
                </td>
                <td>
                    @enrollment.Grade
                </td>
            </tr>
        }
    </table>
</div>
